package com.mall.page.feign;

import com.mall.common.util.RespResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.io.FileNotFoundException;
import java.io.UnsupportedEncodingException;

/**
 * @author Darren
 * @date 2022-08-26 15:03
 * Description：
 */
@FeignClient("mall-page-web")
@RequestMapping("/page")
public interface SeckillPageFeign {

    @GetMapping("/seckill/goods/{id}")
    @ApiOperation("生成秒杀商品详情静态页")
    RespResult page(@PathVariable("id") String id) throws FileNotFoundException, UnsupportedEncodingException;

    @DeleteMapping("/seckill/goods/{actId}")
    @ApiOperation("删除秒杀商品详情静态页")
    RespResult deleteByActId(@PathVariable("actId") String actId);

}
